package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.system.domain.PmsPurchaseRequisitions;
import com.ruoyi.system.domain.WmsInventoryHistory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 库存记录Mapper接口
 *
 * @author ruoyi
 * @date 2025-06-21
 */
public interface WmsInventoryHistoryMapper
{
    /**
     * 查询库存记录
     *
     * @param id 库存记录主键
     * @return 库存记录
     */
    public WmsInventoryHistory selectWmsInventoryHistoryById(Long id);

    /**
     * 查询库存记录列表
     *
     * @param wmsInventoryHistory 库存记录
     * @return 库存记录集合
     */
    public Page<WmsInventoryHistory> selectWmsInventoryHistoryList(@Param("page") Page<WmsInventoryHistory> page, @Param("bo") WmsInventoryHistory wmsInventoryHistory);

    /**
     * 查询库存记录列表
     *
     * @param wmsInventoryHistory 库存记录
     * @return 库存记录集合
     */
    public List<WmsInventoryHistory> selectWmsInventoryHistoryDetailList(WmsInventoryHistory wmsInventoryHistory);

    public List<WmsInventoryHistory> selectWmsInventoryHistoryDetailListFromOutbound(WmsInventoryHistory wmsInventoryHistory);

    /**
     * 新增库存记录
     *
     * @param wmsInventoryHistory 库存记录
     * @return 结果
     */
    public int insertWmsInventoryHistory(WmsInventoryHistory wmsInventoryHistory);

    /**
     * 修改库存记录
     *
     * @param wmsInventoryHistory 库存记录
     * @return 结果
     */
    public int updateWmsInventoryHistory(WmsInventoryHistory wmsInventoryHistory);

    /**
     * 删除库存记录
     *
     * @param id 库存记录主键
     * @return 结果
     */
    public int deleteWmsInventoryHistoryById(Long id);

    /**
     * 批量删除库存记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWmsInventoryHistoryByIds(Long[] ids);

    public int deleteWmsInventoryHistoryByOperationIds(Long[] ids);

    public int editOutboundTotal(WmsInventoryHistory wmsInventoryHistory);

    public int editSubtractOutboundTotal(WmsInventoryHistory wmsInventoryHistory);
}
